﻿CREATE PROCEDURE [dbo].[SecureModule_Insert]

@CreatedBy uniqueidentifier
, @ModifiedBy uniqueidentifier
, @ModuleName varchar (64)
, @SystemName varchar (64)
, @AssemblyFullName varchar (1028)
AS
BEGIN
SET NOCOUNT ON

DECLARE @CreatedDate datetime
DECLARE @ModifiedDate datetime
DECLARE @Deleted bit
DECLARE @SecureModuleID uniqueidentifier
SET @CreatedDate = GETDATE()
SET @ModifiedDate = GETDATE()
SET @Deleted = 0
SET @SecureModuleID = NEWID()

INSERT INTO [dbo].[SecureModule] ([SecureModuleID]
, [CreatedDate]
, [CreatedBy]
, [ModifiedDate]
, [ModifiedBy]
, [Deleted]
, [ModuleName]
, [SystemName]
, [AssemblyFullName]
)
VALUES (@SecureModuleID
, @CreatedDate
, @CreatedBy
, @ModifiedDate
, @ModifiedBy
, @Deleted
, @ModuleName
, @SystemName
, @AssemblyFullName
)

SELECT @SecureModuleID [SecureModuleID]
END
